home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
Panorama3_d1.adf
/
ARexxMacros
/
RivLakePts.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1993-01-17
|
842b
|
34 lines
/* Find the labels of the points along a river starting at the spring
whose number is entered on the command line. The river is continued
through any downstream lakes as long as these have outlets. */
OPTIONS RESULTS
arg nspr
address 'Panorama'
'GetSpringPos' nspr
if rc = 0 then say 'Spring' nspr 'at' RESULT
if rc = 0 then newpt = RESULT
oldpt = 'start'
say 'Downstream points are:'
do while rc=0 & oldpt~=newpt
oldpt = newpt
'NextRivPt' oldpt
if rc = 0 then newpt = RESULT
else exit
say newpt
laken=0
'GetLakeAt' newpt
if rc=0 then laken = ABS(RESULT)
else say 'No lake number found'
if laken>0 then
do
say 'Lake' laken
'GetLakeOutlet' laken
if rc = 0 then newpt = RESULT
else exit
say 'Restart river at' newpt
end
else if laken<0 then
say 'Lake' laken
end